package com.yanyeori.framework.security.constant;

import com.yanyeori.framework.core.constant.BaseErrorCode;

/**
 * SSO错误提示信息
 *
 * @author chenkuan 2021/3/29
 */
public enum SsoErrorCode implements BaseErrorCode {

    SSO_1000(1000, "Username does not exist"),
    SSO_1001(1001, "The password entered the wrong number of times more than {} times. Please try again the next day"),
    SSO_1002(1002, "User status exception"),
    SSO_1003(1003, "Username or password error"),
    SSO_1003_1(1003, "Username or password error:{}"),
    SSO_1004(1004, "An error occurred while logging in. Please try again later"),
    SSO_1005(1005, "Username already exists"),
    SSO_1006(1006, "Username cannot be empty"),
    SSO_1007(1007, "Password cannot be empty"),
    SSO_1008(1008, "Nickname cannot be empty"),
    SSO_1009(1009, "The token has not expired. Please try again later"),
    SSO_1010(1010, "Invalid token mark"),
    SSO_1011(1011, "The token mark has expired. Please log in again"),
    SSO_1012(1012, "Token mark information error"),
    SSO_1013(1013, "Please enter the original password and the new password"),
    SSO_1014(1014, "The original password is incorrect"),
    SSO_1015(1015, "The new password is not the same as the original password."),
    SSO_1016(1016, "Password modified failed"),
    SSO_1017(1017, "Registration failure"),
    SSO_1018(1018, "Not support the channel: {}"),
    SSO_1019(1019, "Decrypt username or password fail");

    private final int code;
    private final String msg;

    SsoErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
